import { Button } from "antd-mobile";

import {
  BrowserRouter as Router,
  Route,
  Link,
  Redirect,
} from "react-router-dom";

import Home from "./pages/Home";
import CityList from "./pages/CityList";
import Map from "./pages/Map";
import HourseDetial from "./pages/HourseDetial";

function App() {
  return (
    <div className="App">
      {/* 好客租房-React移动Web项目<br />
      <Button type="warning">警告按钮</Button> */}
      <Router>
        {/* <Link to="/home">首页</Link> |&nbsp;
        <Link to="/citylist">城市列表</Link> */}

        <Route
          path="/"
          exact
          render={() => <Redirect to="/home/index" />}
        ></Route>
        <Route path="/home" component={Home}></Route>
        <Route path="/citylist" component={CityList}></Route>
        <Route path="/map" component={Map}></Route>
        <Route path="/details/:hourseid" component={HourseDetial}></Route>
      </Router>
    </div>
  );
}

export default App;
